package homework.exp02;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;

public class F {
    static Scanner cin = null;

    static {
        try {
            cin = new Scanner(new FileReader(new File("F.in")));
        } catch (IOException e) {
            cin = new Scanner(System.in);
        }
    }

    static class TrieNode {
        TrieNode[] children;

        TrieNode() {
            children = new TrieNode[256];
        }
    }

    static TrieNode root = new TrieNode();
    static int nodeCount = 1;

    public static void addToTrie(String word) {
        TrieNode curr = root;
        for (char ch : word.toCharArray()) {
            int index = ch;
            if (curr.children[index] == null) {
                curr.children[index] = new TrieNode();
                nodeCount++;
            }
            curr = curr.children[index];
        }
    }

    public static void main(String[] args) {
        while (cin.hasNextLine()) {
            String word = cin.nextLine().trim();
            if (word.isEmpty()) {
                break;
            }
            addToTrie(word);
        }
        System.out.println(nodeCount);
    }
}